/**
 * Copyright (C) 2013 DaiKit.com - daikit4gxt module (admin@daikit.com)
 *
 *         Project home : http://code.daikit.com/daikit4gxt
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.daikit.daikit4gxt.client.action;

/**
 * A chain action creator. <br>
 * This allows you to create a new chain of action while running a chain of action so that the created chain of action
 * is built from a context that depends on the already ran action of the running chain.<br>
 * <br>
 * For example you run an chain of actions. In a given action (B) of the chain you retrieve a value which is necessary
 * to construct the end of the chain. So what to do ?<br>
 * Create a chain of action with (B) as last action. Then you set a {@link ChainActionCreator} in (B). This chain action
 * creator will permit to build the rest of the chain after finishing (B), and then this rest of the chain will be
 * executed as a new chain of actions.
 * 
 * @author tcaselli
 * @version $Revision$ Last modifier: $Author$ Last commit: $Date$
 */
public interface ChainActionCreator
{

	/**
	 * Create a chain of action. This method is called by an action which has this {@link ChainActionCreator} as
	 * chainActionCreator an run time.<br>
	 * This allows you to create a new chain of action while running a chain of action so that the created chain of
	 * action is built from a context that depends on the already ran action of the running chain.<br>
	 * <br>
	 * For example you run an action
	 * 
	 * @return a {@link BaseAction} chain
	 */
	BaseAction<?> getCreatedActions();

}
